<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/style.css"/>
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>


    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>

</head>
<body>
<form action="index.html" method="post" class="definewidth m20">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">姓名</td>
            <td name="hosrName">陆小凤</td>
        </tr>

        <tr>
            <td width="10%" class="tableleft">身份证号</td>
            <td name="hosrIdcar">102434586345673</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">挂号费</td>
            <td name="hosrRegprice">5元</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">社保号</td>
            <td name="hosrMedical">435345435</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">联系电话</td>
            <td name="hosrPhone">12378656789</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">是否自费</td>
            <td name="hosrSelfprice">否</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">性别</td>
            <td name="hosrSex">男</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">年龄</td>
            <td name="hosrAge">33</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">职业</td>
            <td name="hosrWork">狗仔队</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">初复诊</td>
            <td name="hosrLookdoctor">初诊</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">所挂科室</td>
            <td name="dKeshi">骨科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">挂号时间</td>
            <td name="hosrTime">骨科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">主治医生</td>
            <td name="doctorName">欧阳雨露</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">状态</td>
            <td name="hosrState">欧阳雨露</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">备注</td>
            <td name="hosrRemark">此人疑拟有精神病</td>
        </tr>
        <tr>
            <td colspan="2">
                <center>
                    <button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
                </center>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
<script src="/layer/layer.js"></script>
<script src="/Js/getParameter.js"></script>
<script type="text/javascript">
    $(function () {
        let hosrId = getParameter("hosrId");
        let pageNum = getParameter("pageNum");
        let pageSize = getParameter("pageSize");
        //alert(pageSize+","+pageNum);
        //alert(hosrId);
        //根据id回显挂号信息到页面
        queryById(hosrId);
        $('#backid').click(function () {
            window.location.href = "index.html?pageNum=" + pageNum + "&pageSize=" + pageSize;
        });
    });

    //回显函数
    function queryById(hosrId) {
        $.get("/hospital/hosRegister/" + hosrId, {}, function (vo) {
            let obj = vo.obj;
            let dId = obj.dId;
            let hosrName = obj.hosrName;
            let hosrIdcar = obj.hosrIdcar;
            let hosrMedical = obj.hosrMedical;
            let hosrRegprice = obj.hosrRegprice;
            let hosrPhone = obj.hosrPhone;
            let hosrSelfprice = obj.hosrSelfprice == 0 ? "是" : "免费";
            let hosrSex = obj.hosrSex == 1 ? "男" : "女";
            let hosrAge = obj.hosrAge;
            let hosrWork = obj.hosrWork;
            let hosrLookdoctor = obj.hosrLookdoctor == 0 ? "初诊" : "复诊";
            let dKeshi = obj.dKeshi;
            let hosrTime = obj.hosrTime;
            let hosrRemark = obj.hosrRemark;
            let hosrState = "";
            if (obj.hosrState == 0) {
                hosrState = "挂号";
            } else if (obj.hosrState == 1) {
                hosrState = "已住院";
            } else if (obj.hosrState == 2) {
                hosrState = "已出院";
            } else if (obj.hosrState == 3) {
                hosrState = "已退号";
            }
            let hosrRecode = obj.hosrRecode;
            let doctorName = obj.doctorName;

            $("td[name='hosrName']").html(hosrName);
            $("td[name='hosrIdcar']").html(hosrIdcar);
            $("td[name='hosrRegprice']").html(hosrRegprice + "元");
            $("td[name='hosrMedical']").html(hosrMedical);
            $("td[name='hosrPhone']").html(hosrPhone);
            $("td[name='hosrSelfprice']").html(hosrSelfprice);
            $("td[name='hosrSex']").html(hosrSex);
            $("td[name='hosrAge']").html(hosrAge);
            $("td[name='hosrWork']").html(hosrWork);
            $("td[name='hosrLookdoctor']").html(hosrLookdoctor);
            $("td[name='dKeshi']").html(dKeshi);
            $("td[name='doctorName']").html(doctorName);
            $("td[name='hosrRemark']").html(hosrRemark);
            $("td[name='hosrState']").html(hosrState);
            $("td[name='hosrTime']").html(hosrTime);

        }, "json");
    }

</script>